<template>
  <div class="dashboard-container">
    <div class="dashboard-text">
      <el-card>
        <el-row type="flex" justify="start">
          <el-col :span="2">
            <img :src="image" alt="" class="pic">
          </el-col>
          <el-col>
            <i class="el-icon-user-solid" />
            <span> {{ name }}</span>
            <p>欢迎到来!</p>
          </el-col>
        </el-row>
      </el-card>
    </div>
  </div>
</template>

<script>
import { mapGetters } from 'vuex'

export default {
  name: 'Dashboard',
  computed: {
    ...mapGetters([
      'name',
      'image'
    ])
  }
}
</script>

<style lang="scss" scoped>
.dashboard {
  &-container {
    margin: 30px;
  }
  &-text {
    font-size: 30px;
    line-height: 46px;
  }
}
  .pic{
    width: 60px;
  }
  p{
    font-size: 14px;
    margin: 0;
    line-height: 20px;
  }
</style>
